<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="fragments/head :: head(~{:: title})">
    <title>数据库列表</title>
    <link rel="stylesheet" href="../../static/css/bootstrap.min.css"/>
</head>
<body>
<nav th:replace="fragments/navbar :: navbar">navbar</nav>
<div class="container-fluid">
    <div th:insert="fragments/alert :: alert">alert</div>
    <h3 class="text-center">数据库列表</h3>
    <div>
        <div class="text-right">
            <a th:href="@{/table/add/to}">
                <button class="btn-sm btn-link">
                <span class="glyphicon glyphicon-plus-sign">增加表
                </span>
                </button>
            </a>
        </div>
        <table class="table table-bordered">
            <thead>
            <tr>
                <td class="text-center">序号</td>
                <td class="text-center">表名</td>
                <td class="text-center">所在模块</td>
                <td class="text-center">实体名</td>
                <td class="text-center">操作</td>
            </tr>
            </thead>
            <tbody>
            <tr th:each="table,iterStat : ${list}">
                <td class="text-center" th:text="${iterStat.count}">1</td>
                <td class="text-center" >
                    <a th:href="@{'/table/' + ${table.id}}"
                       th:text="${table.tableName}">table_name</a>
                </td>
                <td class="text-center" th:text="${table.moduleName}">module_name</td>
                <td class="text-center" th:text="${table.entityName}">entity_name</td>
                <td class="text-center">
                    <a th:href="@{'/generateSource/table/' + ${table.id} }">代码生成</a>
                    <a th:href="@{'/table/' + ${table.id} + '/update/to'}">修改</a>
                    <a th:href="@{'/table/' + ${table.id} + '/delete'}">删除</a>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <div th:replace="fragments/footer :: copy"></div>
</div>

</body>
</html>